Package reflection
Class ShowClass
java.lang.Object
reflection.ShowClass
A program that displays a class synopsis for the named class
This example is from _Java Examples in a Nutshell_. (http://www.oreilly.com)
This example is provided WITHOUT ANY WARRANTY either expressed or implied.
You may study, use, modify, and distribute it for non-commercial purposes.
For any commercial use, see http://www.davidflanagan.com/javaexamples
- Author:
- David Flanagan, Robert C. Duvall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
Tries to create an object using both a default constructor and one that takes a String.static void
printClass
(Class<?> c) Display modifiers, name, superclass and interfaces of a class or interface.
-
Constructor Details
-
ShowClass
public ShowClass()
-
-
Method Details
-
makeClass
Tries to create an object using both a default constructor and one that takes a String. -
printClass
Display modifiers, name, superclass and interfaces of a class or interface. Then list all constructors, fields, and methods. -
main
- Throws:
ClassNotFoundException
-